package com.halden.mycache.support.listener.impl;

import com.halden.mycache.support.listener.CacheRemoveContext;
import com.halden.mycache.support.listener.ICacheRemoveListener;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Author: halden
 * @Data:2023/2/9 10:41
 * @Description:
 */
@Slf4j
public class LogCacheRemoveListener<K,V> implements ICacheRemoveListener<K,V> {

    private static Logger logger = LogManager.getLogger(LogCacheRemoveListener.class);

    @Override
    public void listen(CacheRemoveContext<K, V> context) {
        logger.debug("Remove key: {}, value: {}, type: {}",
                context.getKey(), context.getKey(), context.getType().getType());
    }
}
